﻿using System;
using System.Collections;
using System.Windows.Forms;
using Narau.Required_interfaces;

namespace Narau.WindowsForms
{
    class Tree_WF : ReqIntf_Tree
    {
        private TreeView  m_TreeView;

        //--------------
        // Constructor
        //--------------
        public Tree_WF(TreeView inTreeView)
        {
            m_TreeView = inTreeView;
        }

        //---------------------------------------------
        // Implementación del interfaz ReqIntf_Tree
        //---------------------------------------------
        #region ReqIntf_Tree Members

            public ReqIntf_TreeNode NewTreeNode()
            {
                TreeNode new_WF_tree_node;

                m_TreeView.BeginUpdate();
                new_WF_tree_node = m_TreeView.Nodes.Add("");
                m_TreeView.EndUpdate();

                TreeNode_WF WF_node = new TreeNode_WF(m_TreeView, new_WF_tree_node);

                return WF_node;
            }

        #endregion
    }
}
